package com.gzq.factorymethod.practice0;

import java.lang.reflect.InvocationTargetException;

public class BaGuaLuImpl implements IBaGuaLu {

	@Override
	public <T extends Human> T createHuman(Class<T> c) {
		T human = null; 
		try {
			human = c.getConstructor().newInstance();
		} catch (InstantiationException | IllegalAccessException
				| IllegalArgumentException | InvocationTargetException
				| NoSuchMethodException | SecurityException e) {
			e.printStackTrace();
		}
		return human;
	}

}
